package cn.dao;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

import cn.pojo.Category;

/**
 * 分类接口
 * @author 莫文聪
 *
 */
public interface CategoryDao {
	/**
	 * 添加分类
	 * @param connection
	 * @param category
	 * @throws SQLException 
	 */
	Boolean addCategory(Connection connection,Category category) throws SQLException;
	
	/**
	 * 获取分类列表
	 * @param connection
	 * @return
	 * @throws SQLException 
	 */
	List<Category> getCategory(Connection connection,int pageNo,int pageSize,String categoryname) throws SQLException;
	
	/**
	 * 根据id删除分类
	 * @param connection
	 * @param id
	 * @throws SQLException 
	 */
	Boolean deleteCategory(Connection connection,Integer id) throws SQLException;
	
	int getCategoryCount(Connection connection) throws SQLException;
}
